/**
 * create by young (young2f@outlook.com) on 2023/4/16
 */
'use strict';
module.exports = app => {
  const { router, controller } = app;
  router.post('/api/finance/record/create', controller.finance.createRecord);
  router.post('/api/finance/record/delete', controller.finance.deleteRecord);
  router.post('/api/finance/record/update', controller.finance.updateRecord);
  router.post('/api/finance/record/find/many', controller.finance.findRecordMany);
  router.post('/api/finance/record/find', controller.finance.findRecord);
  router.post('/api/finance/record/statistics', controller.finance.findRecordStatistics);

  router.post('/api/finance/bank/account/find/many', controller.finance.findBankAccountMany);
  router.post('/api/finance/bank/account/create', controller.finance.createBankAccount);
  router.post('/api/finance/bank/account/delete', controller.finance.deleteBankAccount);
  router.post('/api/finance/bank/account/update', controller.finance.updateBankAccount);

  router.post('/api/finance/balance/last/month/find', controller.finance.getLastMonthBalance);
  router.post('/api/finance/balance/find', controller.finance.getBalance);
  /**
   * 收支统计
   */
  // router.post('/api/finance/record/statistics', controller.finance.getBalance);
  router.post('/api/finance/record/export', controller.finance.exportRecordExcel);

  /**
   * 付款费用
   */
  router.post('/api/finance/payment/find/many', controller.finance.findPaymentMany);
  router.post('/api/finance/procure/payment/find/many', controller.finance.findProcureRecordMany);
  router.post('/api/finance/procure/payment/assess', controller.finance.procureRecordAssess);
  router.post('/api/finance/procure/payment/fixed/assess', controller.finance.fixedAssess);//固定资产

  //资产统计
  router.post('/api/finance/assess', controller.finance.assess);
  router.post('/api/finance/tax/assess', controller.finance.taxAssess);
  /**
   * 开票收票
   */
  router.post('/api/finance/invoice/record/create', controller.finance.createInvoiceRecord);
  router.post('/api/finance/invoice/record/find/many', controller.finance.findInvoiceRecords);
  router.post('/api/finance/invoice/record/delete', controller.finance.deleteInvoiceRecord);
  router.post('/api/finance/invoice/record/update', controller.finance.updateInvoiceRecord);
  /**
   * 开票订单
   */
  router.post('/api/finance/invoice/sales/find/many', controller.finance.findInvoiceSalesMany);
  router.post('/api/finance/invoice/procure/find/many', controller.finance.findInvoiceProcureMany);
  router.post('/api/finance/invoice/assess', controller.finance.invoiceAssess);
  router.post('/api/finance/invoice/receipt/assess', controller.finance.invoiceReceiptAssess);
};
